// Author: wsfuyibing <682805@qq.com>
// Date: 2025-06-12

package kind

// ReturnState
// 回鱼状态.
type ReturnState int

const (
	_ ReturnState = iota

	ReturnStateNot
	ReturnStateReturned
)

var (
	returnStateTexts = map[ReturnState]string{
		ReturnStateNot:      "未回鱼",
		ReturnStateReturned: "已回鱼",
	}
	returnStateUndefined = ""

	returnStateFlags = map[ReturnState]string{
		ReturnStateNot:      "not",
		ReturnStateReturned: "yes",
	}
	returnStateUnknownFlag = ""
)

func (o ReturnState) Flag() string {
	if str, ok := returnStateFlags[o]; ok {
		return str
	}
	return returnStateUnknownFlag
}

func (o ReturnState) IsNot() bool      { return o == ReturnStateNot }
func (o ReturnState) IsReturned() bool { return o == ReturnStateReturned }

func (o ReturnState) Text() string {
	if str, ok := returnStateTexts[o]; ok {
		return str
	}
	return returnStateUndefined
}
